package zigzag.designpattern.memento;

public class Originator {
	private double manufacturer=0;
	private double distributor = 0;
	private double retailer = 0;

	public void makeSale(double purchasePrice){
		manufacturer += purchasePrice *.40;
		distributor += purchasePrice *.3;
		retailer += purchasePrice *.3;
	}
	public Memento createMemento(){
		return (new Memento(manufacturer, distributor, retailer));			
	}
	
	public void setMemento(Memento m){
		manufacturer = m.getM();
		distributor = m.getD();
		retailer = m.getR();
	}

}
